import request from '@/utils/requestUtil'

// 根据商品的ID查询优惠券
export function fetchProductCouponList(productId) {
	return request({
		method: 'GET',
		url: `/coupon/coupon/getCoupon/${productId}`,
	})
}

// 领取优惠券
export function addMemberCoupon(couponId) {
	return request({
		method: 'POST',
		url: `/member/coupon/add/${couponId}`,
	})
}


// 查询自己优惠券
export function fetchMemberCouponList(logStart) {
	return request({
		method: 'GET',
		url: `/coupon/coupon/selectLogStart/${logStart}`,
	})
}

// 查询总数
export function couponCount(params) {
	return request({
		method: 'GET',
		url: '/coupon/coupon/couponCount',
		params:params
	})

}

